-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add some test functions to ppigrf #8
Conversation
Add tests against precomputed IGRF values.
@klaundal I've wrote some tests that compare |
@santisoler I did a quick comparison for one point with the NOAA calculator now. The deviations are very small, but too large to be floating point precision I think. I doubt that the coefficient files are different. One possibility is that it is an issue with how the time interpolation between model coefficients is implemented. And/or the conversion between geodetic and geocentric coordinates and components (I get a very good match in the eastward component, which is not affected by this). Still, the deviations are tiny, typically less than 1 nT. This rarely has any practical consequence, but it would be good to know why it happens. Comparison with an open code would be preferable though. |
I suspect you're right and this is coming from the interpolations on the dates. I also checked I've just run a quick check comparing on 2020-01-01 (so no interpolation should be carried out) and the tests pass. So apparently the difference is coming from the date interpolation. I will push new tests with no interpolation on date. |
Increase the atol so we let the test pass, accounting for the fact that the differences are coming from the interpolations along the dates.
Hi @klaundal! After a few weeks (time flies!) I managed to fix the tests so they pass. I've increased the |
Add tests against precomputed IGRF values. There are small differences between the results that
ppigrf
generates and the ones that the NCEI Calculator produces on dates that require some interpolation along the dates. The difference is not significant.